<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class OrderRemark extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_remark', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('order_id')->comment('订单ID');
            $table->unsignedBigInteger('node_id')->default(0)->comment('节点ID');
            $table->string('node_name')->nullable()->comment('节点名称');
            $table->text('content')->nullable()->comment('备注跟进内容');
            $table->unsignedBigInteger('user_id')->default(0)->comment('备注跟进人ID');
            $table->string('user_nickname')->nullable()->comment('备注跟进人昵称');
            $table->text('multiple_file')->nullable()->comment('附件，多个用,隔开');
            $table->unsignedBigInteger('check_user_id')->default(0)->comment('审核人ID');
            $table->string('check_user_nickname')->nullable()->comment('审核人昵称');
            $table->tinyInteger('check_status')->default(1)->comment('审核状态：1审核中，2审核不通过，3审核通过，默认1');
            $table->string('check_result')->nullable()->comment('审核结果');
            $table->dateTime('check_time')->nullable()->comment('审核时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_remark');
    }
}
